package com.keyue.common.constant;

import java.util.Arrays;
import java.util.List;

public class Constant {
    /**
     * 分隔符英文的横杠
     */
    public static final String CROSS_BAR_CHARACTER = "-";
    /**
     * 英文的 .
     */
    public static final String POINT_BAR_CHARACTER = ".";
    /**
     * 英文的 ！
     */
    public static final String EXCLAMATION_MARK_CHARACTER = "!";
    /**
     * 英文的 /
     */
    public static final String SLASH_MARK_CHARACTER = "/";
    /**
     * 英文的 :
     */
    public static final String COLON_CHARACTER = ":";

    /**
     * 英文的 ;
     */
    public static final String SEMICOLON_CHARACTER = ";";

    /**
     * 英文的逗号
     */
    public static final String COMMA_CHARACTER = ",";
    /**
     * 英文的*号
     */
    public static final String START_CHARACTER = "*";
    /**
     * 分隔符
     */
    public static final String SPLIT_SYMBOL = ",|，";

    /**
     * 特殊分隔符 _
     */
    public static final String SPECIAL_KEY = "_";


    /**
     * 括号
     */
    public static final String BRACKETS_RIGHT = "]";
    /**
     * 括号
     */
    public static final String BRACKETS_LEFT = "[";

    /**
     * 手机号码正则校验
     */
    public static final String PHONE_REGEXP = "^[1][3,4,5,6,7,8,9][0-9]{9}$";

    /**
     * 脱敏手机号
     */
    public static final String PHONE_DESENSITIZATION_REGEXP = "^[1][3,4,5,6,7,8,9][0-9][*]{4}[0-9]{4}$";

    /**
     * 邮箱
     */
    public static final String EMAIL_REGEXP = "^\\s*\\w+(?:\\.{0,1}[\\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\\.[a-zA-Z]+\\s*$";

    /**
     * 三位数字
     */
    public static final String THREE_DIGITS_REGEXP = "\\d{3}";

    /**
     * 中文 英文 数字
     */
    public static final String CHI_EN_NUM_REGEXP = "^[A-z0-9\\u4e00-\\u9fa5]*$";


    /**
     * 仅包含英文和数字
     */
    public static final String EN_REGEXP = "^[a-zA-Z]+$";

    public static final String EN_NUM_REGEXP = "^[a-z0-9A-Z]+$";

    public static final String LINE_EN_NUM_REGEXP = "^[a-z0-9A-Z\\-]+$";

    /**
     * 仅包含英文和中文
     */
    public static final String CHI_EN_REGEXP = "^[A-z\\u4e00-\\u9fa5]*$";

    /**
     * 纯数字
     */
    public static final String NUMERIC_REGEXP = "^\\d+$";
    /**
     * 纯中文
     */
    public static final String CHI_REGEXP = "^[\u4e00-\u9fa5]+$";
    /**
     * 不超过两位小数
     */
    public static final String DICMAL_REGEXP = "^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,3})?$";

    /**
     * 默认空字符串
     */
    public static final String EMPTY_STRING = "";

    /**
     * 统一返回data的key
     */
    public static final String RESULT_CHARACTER = "result";

    /**
     * 统一返回data的key
     */
    public static final String SUCCESS_RESULT_CHARACTER = "success";

    /**
     * 返回的默认结果集
     */
    public static final String RESULT_FAIL = null;

    /**
     * ENABLE_FLAG
     */
    public static final String ENABLE_FLAG = "enable_flag";

    /**
     * 是否可用 10-可用 20-删除
     */
    public static final int ENABLE_TEN = 10;
    /**
     * 是否可用 10-可用 20-删除
     */
    public static final int UNABLE_TWENTY = 20;

    public static final int ONE = 1;

    public static final Integer INTEGER_ONE = 1;

    public static final int TWO = 2;

    public static final int THREE = 3;

    public static final int FOUR = 4;

    public static final int FIVE = 5;

    public static final int SIX = 6;

    public static final int SEVEN = 7;

    public static final int THIRTY = 30;

    public static final int NINETEEN = 19;

    public static final int THOUSAND = 1000;

    public static final String DATE_TIME = "yyyy-MM-dd HH:mm:ss";

    public static final int ZERO = 0;

    public static final String STRING_ZERO = "0";

    public static final String ZERO_STRING = "0";

    public static final String THOUSAND_STRING = "1000";

    public static final String SYSTEM_USER = "System";

    public static final String percent50 = "0.5";

    public static final String DELETE_SUCCESS_RESULT_CHARACTER = "删除成功";


    /**
     * token rediskey
     */
    public static final String TOKEN_FLAG = "token:";
    /**
     * token 限制api请求
     */
    public static final String PERMISSION_API_LIMIT = "token_api_limit:";

    /**
     * token过期时间
     */
    public static final Integer TOKEN_EXPIRE_HOURS = 1;
    /**
     * 密码3次错误锁定
     */
    public static final int LOCK_ERROR_TIMES = 3;

    /**
     * session字段
     */
    public static final String HEAD_TOKEN = "Authorization";
    public static final String ACCESS_TOKEN = "token";
    public static final String REQUEST_ORIGIN = "source";
    public static final String REQUEST_IP = "ip";
    public static final String USER_INFO = "userInfo";
    public static final String FILED_ID = "id";
    public static final String FILED_USER_NAME = "username";
    public static final String FILED_DEVICE_NUM = "deviceNum";

    /**
     * 请求来源
     */
    public static final String ORIGIN_WEB = "WEB";
    public static final String ORIGIN_PDA = "PDA";

    /**
     * 1001 参数校验不通过
     * 1002 签名验证不通过
     */
    public static final List<String> ERROR_CODE_LIST = Arrays.asList("1001", "1002");

    /**
     * 分布式锁超时时间
     */
    public static final long REDIS_LOCK_DEFAULT_TIME_OUT_MILLIS = 3000;
    public static final long REDIS_LOCK_FIVE_SECONDS_TIME_OUT_MILLIS = 5000;

    /**
     * 系统来源WMS
     */
    public static final String SYS_ORIGIN_WMS = "WMS";

    public static final String STRING_ONE = "1";


    public static final String STRING_TWO = "2";

    public static final String STRING_THREE = "3";

    public static final String STRING_FOUR = "4";

    public static final String STRING_FIVE = "5";

    public static final String STRING_SIX = "6";

    public static final String STRING_SEVEN = "7";

    public static final String STRING_EIGHT = "8";

    public static final String STRING_NINE = "9";

    public static final String STRING_TEN = "10";

    public static final String STRING_ELEVEN = "11";

    public static final String STRING_TWELVE = "12";

    public static final String ALL = "All";
    public static final String ALL_ = "ALL";

    public static final String ALL_CN = "全部";


    /**
     * 异常延时队列后缀
     */
    public static final String ERROR_DELAY_QUEUE_SUFFIX = "error";

    /**
     * 推送出库数据延时队列 redis key prefix
     */
    public static final String OUTBOUND_NOTIFY_DELAY_QUEUE_PREFIX = "outbound:notify:";

    /**
     * 同步MES库存队列 redis key prefix
     */
    public static final String MES_STOCK_SYNC_QUEUE_PREFIX = "mes:stock_sync:";

    /**
     * 分拣详情 错误码: 157205   返回值段
     */
    public static final String SEPARATE_PICK_QUERY_RETURN_FIELD = "separatePickQuery";
    /**
     * 限制上限值
     */
    public static final Integer LIMIT_999 = 999;

    /**
     * 东八区
     */
    public static final String GMT_8 = "GMT+8";

    /**
     * 英文的 "
     */
    public static final String QUOTATION_MARK_CHARACTER = "\"";


    /**
     * 英文的 \"
     */
    public static final String QUOTATION_SLASH_MARK_CHARACTER = "\\\"";

    public static final String SUCCESS_VALUE = "success";


    public static final String TRUE = "true";

    public static final String ROOT_PARENT_ID = "0";

    public static final Long ROOT_PARENT_ID_LONG = 0L;


    /**
     * 短信验证码 redis key
     */
    public static final String SMS_AUTH_CODE_PREFIX = "sms:auth:code:";

    public static final String DEFAULT_PASSWORD = "JBXT123456";

    /**
     * 账号在线队列 redis key
     */
    public static final String ACCOUNT_ONLINE_LIST = "account:online:";

    /**
     * 缓存导入excel错误信息 redis key
     */
    public static final String EXCEL_IMPORT_ERROR_PREFIX = "excel:import:error:";

    /**
     *
     */
    public static final String DEFAULT_CITY = "汕头";

    public static final String HOME_PICTURE_KEY = "home_picture";

}
